package com.wing.oauth2.feign;

import com.wing.common.utils.JsonResult;
import mode.TokenVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "oauth2",url = "${enterprise.gatewayUrl}",fallback = LoginFeignClientFallback.class)
public interface LoginFeignClient {

    @GetMapping(value = "oauth2/admin/user/login")
    JsonResult<TokenVO> login(
            @RequestParam("username")String username
            ,@RequestParam("password")String password
            ,@RequestParam("grant_type") String grant_type
            ,@RequestParam("client_id") String client_id
            ,@RequestParam("client_secret") String client_secret);
}
